
<div class="container content">
    <div class="trong-content">
	<div class="left">
	    <?php $this->renderPartial('//layouts/menu_left'); ?>
	</div><!--left-->
	<div class="center">

	    <div class="box update-account-box">
		<div class="new-mem">		    
		    <?php
		    if ($type == 'my_flirts') {
			?>
    		    <div class="title">
    			My flirts			
    		    </div>

			<?php
			$this->widget('bootstrap.widgets.TbGridView', array(
			    'id' => 'flirt-grid',
			    'dataProvider' => $model->search($type),
			    'filter' => $model,
			    'columns' => array(
				array(
				    'header' => 'Avatar',
				    'type' => 'raw',
				    'value' => function($data) {
					return '<img src="' . $data->r_receiver->getAvatarUrl('small') . '"/>';
				    }
				),
				array(
				    'name' => 'userName',
				    'type' => 'raw',
				    'value' => function($data) {
					return $data->r_receiver->getUserName();
				    }
				),
				array(
				    'type' => 'raw',
				    'value' => function($data) {
					return $data->r_receiver->getBtnSendMsg();
				    }
				),
				array(
				    'type' => 'raw',
				    'value' => function($data) {
					return $data->r_receiver->getBtnChat();
				    }
				),
				array(
				    'header' => 'Date Flirted',
				    'name' => 'time_created',
				    'value' => function($data) {
					return date('m-d-Y', strtotime($data->time_created));
				    },
				    'filter' => FALSE,
				    'htmlOptions' => array(
					'width' => 100
				    )
				),
				array(
				    'class' => 'bootstrap.widgets.TbButtonColumn',
				    'template' => '{delete}',
				    'htmlOptions' => array(
					'width' => 5
				    )
				),
			    ),
			));
			?>
		    <?php } else {
			?>

    		    <div class="title">
    			Who flirted with me?
    		    </div>

			<?php
			$this->widget('bootstrap.widgets.TbGridView', array(
			    'id' => 'flirt-grid',
			    'dataProvider' => $model->search($type),
			    'filter' => $model,
			    'columns' => array(
				array(
				    'header' => 'Avatar',
				    'type' => 'raw',
				    'value' => function($data) {
					return '<img src="' . $data->r_sender->getAvatarUrl('small') . '"/>';
				    }
				),
				array(
				    'name' => 'userName',
				    'type' => 'raw',
				    'value' => function($data) {
					return $data->r_sender->getUserName();
				    }
				),
				array(
				    'type' => 'raw',
				    'value' => function($data) {
					return $data->r_sender->getBtnSendMsg();
				    }
				),
				array(
				    'type' => 'raw',
				    'value' => function($data) {
					return $data->r_sender->getBtnChat();
				    }
				),
				array(
				    'header' => 'Date Flirted',
				    'name' => 'time_created',
				    'value' => function($data) {
					return date('m-d-Y', strtotime($data->time_created));
				    },
				    'filter' => FALSE,
				    'htmlOptions' => array(
					'width' => 100
				    )
				),
				array(
				    'class' => 'bootstrap.widgets.TbButtonColumn',
				    'template' => '{delete}',
				    'htmlOptions' => array(
					'width' => 5
				    )
				),
			    ),
			));
			?>
		    <?php } ?>
		</div>		
	    </div><!--box-->

	</div><!--center-->
	<div class="right">

	    <?php $this->widget('application.widgets.leftprofile.PercentComplete') ?>
	    <?php $this->widget('application.widgets.leftprofile.Interested'); ?>

	</div><!--right-->

    </div><!--trong-content-->


</div><!--content-->
